

const n3 = Promise.resolve(3)
const n2 = new Promise((resolve, _rejected) => {
  resolve(2)   //执行resolve改变状态值
})
const n1 = Promise.resolve(1)
Promise.all([n1, n2, n3]).then(value => {
  console.log(value)
}).catch(err => {
  console.log(err)
})

// Promise.race([n1, n2, n3]).then(value => { console.log(value) }).catch(err => {
//   console.log(err)
// })